# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvs/zport/sci-mathematics/minisat/minisat-2.070721.ebuild,v 1.1 2007/08/21 02:36:38 zechs Exp $

inherit eutils

my_S="${WORKDIR}/minisat"
DESCRIPTION="MiniSat - a SAT solver."
HOMEPAGE="http://minisat.se/"
SRC_URI="http://minisat.se/downloads/${P}.zip"

LICENSE="as-is"
SLOT="0"
KEYWORDS="x86 sparc"
IUSE="simp"
DEPEND=""
RDEPEND="${DEPEND}"

src_unpack() {
	unzip -d ${WORKDIR} ${DISTDIR}/${P}.zip
}

src_compile() {
	cd ${my_S}
	if use simp; then
		cd simp
	else
		cd core
	fi
	emake
}

src_install() {
	cd ${my_S}
	if use simp; then
		newbin simp/minisat minisat2
	else
		newbin core/minisat minisat2
	fi
}
